<?php

class Operation
{
    public function testPlus()
    {
        printf("plus: %s\n", (1 + 2 == 3 ? 'true' : 'false'));
    }
    
    public function testMinus()
    {
        printf("minus: %s\n", (3 - 2 == 2 ? 'true' : 'false'));
    }
    
    public function testTimes() {
        printf("times: %s\n", (2 * 3 == 6 ? 'true' : 'false'));
    }
}


class Tester
{
    protected $operation;
    
    public function __construct()
    {
        $this->operation = new Operation();
    }

    //对外提供统一的接口，通过 testAll 可以测试全部方式
    public function testAll()
    {
        $this->operation->testPlus();
        $this->operation->testMinus();
        $this->operation->testTimes();
    }
}

$test = new Tester();
$test->testAll();